{{- if ne .Site.Params.footer.enable false -}}
  <footer class="footer">
    <div class="footer-container">
      {{- /* Custom Content */ -}}
      {{- partial (.Scratch.Get "customFilePath").footer . -}}

      {{- /* Hugo and FixIt */ -}}
      {{- if ne .Site.Params.footer.hugo false -}}
        <div class="footer-line powered{{ with .Site.Params.footer.order.powered }} order-{{ . }}{{ end }}">
          {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreferrer" title="Hugo %v">Hugo</a>` hugo.Version -}}
          {{- $theme := printf `<a href="https://github.com/hugo-fixit/FixIt" target="_blank" rel="external" title="FixIt %v"><img class="fixit-icon" src="%v" alt="FixIt logo" />&nbsp;FixIt</a>`
            (.Scratch.Get "version")
            (resources.Get "fixit.svg" | minify).RelPermalink
          -}}
          {{- dict "Hugo" $hugo "Theme" $theme | T "footer.poweredBySome" | safeHTML }}
        </div>
      {{- end -}}

      {{- if .Site.Params.footer.copyright | or .Site.Params.footer.author | or .Site.Params.footer.license -}}
        <div class="footer-line copyright{{ with .Site.Params.footer.order.copyright }} order-{{ . }}{{ end }}" itemscope itemtype="http://schema.org/CreativeWork">
          {{- /* Copyright year */ -}}
          {{- if ne .Site.Params.footer.copyright false -}}
            {{ dict "Class" "fa-regular fa-copyright fa-fw" | partial "plugin/icon.html" }}
            {{ with .Site.Params.footer.since -}}
              <span itemprop="copyrightYear">
                {{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
              </span>
            {{- else -}}
              <span itemprop="copyrightYear">{{ now.Year }}</span>
            {{- end -}}
          {{- end -}}

          {{- /* Author */ -}}
          {{- if ne .Site.Params.footer.author false -}}
            <span class="author" itemprop="copyrightHolder">
              {{ partial "plugin/link.html" (dict "Destination" ($.Site.Author.link | default .Site.Home.RelPermalink) "Content" .Site.Author.name) -}}
            </span>
          {{- end -}}

          {{- /* License */ -}}
          {{- with .Site.Params.footer.license -}}
            <span class="license footer-divider">{{ . | safeHTML }}</span>
          {{- end -}}
        </div>
      {{- end -}}

      {{- $siteTime := .Scratch.Get "siteTime" -}}
      {{- if $siteTime.enable | or .Site.Params.footer.wordCount -}}
        <div class="footer-line statistics{{ with .Site.Params.footer.order.statistics }} order-{{ . }}{{ end }}">
          {{- if $siteTime.enable | and $siteTime.value -}}
            {{- with $siteTime -}}
              <span class="site-time" title='{{ T "footer.siteRunning" }}'>
                {{- $siteTimeIcon := printf (cond .Animate "%v fa-fw animate-icon" "%v fa-fw") .Icon -}}
                {{- dict "Class" $siteTimeIcon | partial "plugin/icon.html" -}}
                {{- with .Pre -}}<span class="ms-1 d-none">{{ . }}</span>{{- end -}}
                {{- printf `<span class="run-times ms-1">%v</span>` (T "footer.siteRunning") | safeHTML -}}
              </span>
            {{- end -}}
          {{- end -}}
        </div>
      {{- end -}}

      {{- /* 不蒜子 */ -}}
      {{- if eq .Site.Params.ibruce.enable true -}}
        {{- $loading := dict "Class" "fa-solid fa-spinner fa-spin fa-fw" | partial "plugin/icon.html" -}}
        <div class="footer-line visitor{{ with .Site.Params.footer.order.visitor }} order-{{ . }}{{ end }}">
          <span id="busuanzi_container_site_uv" title='{{ T "footer.siteUV" }}'>
            {{- dict "Class" "fa-regular fa-user fa-fw" | partial "plugin/icon.html" -}}&nbsp;<span id="busuanzi_value_site_uv">{{ $loading }}</span>{{- /* NO_SPACING */ -}}
          </span>
          {{- /* NO_SPACING */ -}}
          <span id="busuanzi_container_site_pv" class="footer-divider" title='{{ T "footer.sitePV" }}'>
            {{- dict "Class" "fa-regular fa-eye fa-fw" | partial "plugin/icon.html" -}}&nbsp;<span id="busuanzi_value_site_pv">{{ $loading }}</span>{{- /* NO_SPACING */ -}}
          </span>
        </div>
      {{- end -}}
      
      {{- if .Site.Params.footer.gov | or .Site.Params.footer.icp -}}
        <div class="footer-line beian{{ with .Site.Params.footer.order.beian }} order-{{ . }}{{ end }}">
          {{- /* GOV */ -}}
          {{- with .Site.Params.footer.gov -}}
            <span class="gov">{{ . | safeHTML }}</span>
          {{- end -}}

          {{- /* ICP */ -}}
          {{- with .Site.Params.footer.icp -}}
            <span class="icp footer-divider">{{ . | safeHTML }}</span>
          {{- end -}}
        </div>
      {{- end -}}
    </div>
  </footer>
{{- end -}}
